Java Just in Time

نویسندگان

  • Timothy Cramer
  • Richard Friedman
  • Terrence Miller
  • David Seberger
  • Robert Wilson
  • Mario Wolczko
چکیده

he Java programming language promises portable, secure execution of applications. Early Java implementations relied on interpretation, leading to poor performance compared to compiled programs. Compiling Java programs to the native machine instructions provides much higher performance. Because traditional compilation would defeat Java's portability and security, another approach is necessary. This article describes some of the important issues related to just-in-time, or JIT, compilation techniques for Java. We focus on the JIT compilers developed by Sun for use with the JDK (Java Development Kit) virtual machine running on SPARC and Intel processors. (Access the Web at www.sun. com/workshop/java/jit for these compilers and additional information.) We also discuss performance improvements and limitations of JIT compilers. Future Java implementations may provide even better performance, and we outline some specific techniques that they may use. The Java Virtual Machine (JVM) assures Java application portability and security. The JVM provides a well-defined runtime framework in which Java programs are compiled for a hypothetical instruction set architecture. 1 Programs are distributed in this abstract form, divorced from the details of any other computer architecture. Running a Java program involves either interpreting JVM instructions, compiling them into instructions of the underlying hardware, or directly executing them in a hardware implementation of the JVM. The JVM is a stack machine. Each instruction gets its operands from the top of a stack, consuming those values and optionally replacing them with a result. The instructions themselves are encoded in a compact form of variable length, with the shortest instructions occupying 1 byte and most instructions being 1 to 3 bytes long. This form of encoding is known as bytecode. Previous systems such as the UCSD Pascal System and most Smalltalk implementations have used similar bytecodes. A Java source-to-bytecode compiler, such as the javac program of the JDK, compiles the classes that constitute a Java program. The compiler translates methods in each source class into bytecode instructions and places all the bytecodes for a class together in a class file. To run a Java program, the JVM loads the class file containing the program's entry point, and execution begins. The program may reference other class files, which are loaded in turn (possibly across a network). Hence, the final association of class files to form a running program takes place as execution proceeds. To maintain the integrity of the Java execution model, the JVM checks that a variety of semantic constraints are …

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Optimizing Java Bytecode for Embedded Systems

Modern Java Virtual Machines (JVM) for desktop and server computers use just-in-time (JIT) compilation to increase their performance. For embedded Java processors, JIT usually is not feasable. Therefore the java bytecode needs to be optimized for a specific platform ahead-of-time. To generate optimized bytecode for the JOP Java processor several existing tools were compared. In order to impleme...

متن کامل

A Retargetable JIT Compiler for Java

Interpreted Java has poor performance. Therefore most Java Virtual Machines (JVM) contain a just-in-time compiler (JIT) that compiles the bytecode to the processor’s native instruction set. Most of these compilers are written in C and tightly integrated with the JVM. We describe a JIT compiler that is written in Java and retargetable to a different JVMs and CPUs.

متن کامل

Toba: Java for Applications - A Way Ahead of Time (WAT) Compiler

Toba is a system for generating efficient standalone Java applications. Toba includes a Java-bytecode-to-C compiler, a garbage collector, a threads package, and Java API support. Toba-compiled Java applications execute 1.5–10 times faster than interpreted and Just-In-Time compiled applications.

متن کامل

A New Approach for Java in Embedded Networks

This article starts with a short introduction of modern control networks and surveys severe problems, one faces when porting a Java Virtual Machine (JVM) to embedded components. Some possible solutions for those problems are presented, special purpose VMs, just-in-time (JIT) compilers or the use of compiled byte-code are evaluated. Finally, we assess a potential solution regarding a new approac...

متن کامل

Design and Implementation of Pep, A Java Just-in-Time Translator

Java, a new object-oriented member of the C family of languages, has become popular in part because it emphasizes portability. Portability is achieved by compiling programs to machine-independent bytecodes that can be interpreted on a Java virtual machine. Unfortunately, interpreted performance does not match native code performance. A just-in-time compiler can regain performance without sacrif...

متن کامل

Implementing an E cient Java

The Java virtual machine (JVM) is usually implemented with an interpreter or just-in-time (JIT) compiler. JIT compilers provide the best performance, but must be substantially rewritten for each architecture they are ported to. Interpreters are easier to develop and maintain, and can be ported to new architectures with almost no changes. The weakness of interpreters is that they are much slower...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997